<div class="box-body">
    <form class="layui-form" action="{:url('/wms/brand/save')}" method="post">
        <div class="layui-form-item">
            <label class="layui-form-label xrequired">中文名</label>
            <div class="layui-input-block">
                <input type="text" autocomplete="off" placeholder="中文名"  name="name_ch" {if isset($brand)}value="{$brand.name_ch}"{/if}  class="layui-input" />
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">英文名</label>
            <div class="layui-input-block">
                <input type="text" autocomplete="off" placeholder="英文名"  name="name_en" {if isset($brand)}value="{$brand.name_en}"{/if} class="layui-input" />
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">类型</label>
            <div class="layui-input-block">
                <input type="text" autocomplete="off" placeholder="类型"  name="type" {if isset($brand)}value="{$brand.type}"{/if} class="layui-input" />
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">品牌LOGO</label>
            <div class="layui-input-block">
                <button id="logo-upload-btn" type="button" class="layui-btn layui-btn-sm"><i class="layui-icon layui-icon-upload"></i>上传</button>
                <input type="hidden" id="brand-logo-path" name="logo_path" {if isset($brand)}value="{$brand.logo_path}"{/if}>
                {if isset($brand) && !empty($brand.logo_path)}
                    <img src="{$brand.logo_path}" id="brand-logo-img" style="width: 80px; margin-left: 50px;">
                {else}
                    <img id="brand-logo-img" style="display: none; width: 80px; margin-left: 50px;">
                {/if}
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">排序</label>
            <div class="layui-input-block">
                <input type="number" autocomplete="off" placeholder="排序"  name="sort" {if isset($brand)}value="{$brand.sort}"{/if} class="layui-input" />
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">是否授权</label>
            <div class="layui-input-block">
                <input type="checkbox" name="is_auth" value="1" {if !isset($brand) || (isset($brand) && $brand.is_auth=='1')}checked{/if} lay-skin="switch">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">状态</label>
            <div class="layui-input-block">
                <input type="checkbox" name="status" value="1" {if !isset($brand) || (isset($brand) && $brand.status=='1')}checked{/if} lay-skin="switch">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">备注</label>
            <div class="layui-input-block">
                <input type="text" autocomplete="off" placeholder="备注"  name="remark" {if isset($brand)}value="{$brand.remark}"{/if} class="layui-input" />
            </div>
        </div>
        {if isset($brand)}
        <input type="hidden" name="brand_id" value="{$brand.brand_id}">
        {/if}
    </form>
</div>